package com.zhuzhe.blog.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zhuzhe.blog.base.ResponseData;
import com.zhuzhe.blog.system.entity.SysRole;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhuzhe.blog.system.requestDto.SysRolePageDto;
import com.zhuzhe.blog.system.responseVo.SysRoleListVo;

import java.util.List;

/**
 * <p>
 * 角色信息表 服务类
 * </p>
 *
 * @author u53
 * @since 2020-10-13
 */
public interface ISysRoleService extends IService<SysRole> {

    /**
     * 分页查询角色列表
     * @author   whh
     * @param sysRolePageDto
     * @return      com.zhuzhe.blog.base.ResponseData<com.baomidou.mybatisplus.core.metadata.IPage<com.zhuzhe.blog.system.responseVo.SysRoleListVo>>
     * @exception
     * @date        2020/10/17 13:37
     */
    ResponseData<IPage<SysRoleListVo>> queryPage(SysRolePageDto sysRolePageDto);


    /**
     * 根据id删除角色
     * @author   whh
     * @param id
     * @return      com.zhuzhe.blog.base.ResponseData<java.lang.String>
     * @exception
     * @date        2020/10/17 15:52
     */
    ResponseData<String> deleteById(String id);



    /**
     * 查询角色下授权菜单ids
     * @author   whh
     * @param id
     * @return      com.zhuzhe.blog.base.ResponseData<java.util.List<java.lang.String>>
     * @exception
     * @date        2020/10/17 15:52
     */
    ResponseData<List<String>> findMenuIdsById(String id);

    /**
     * 授权角色菜单权限
     * @author   whh
     * @param id
     * @param menuIds
     * @return      com.zhuzhe.blog.base.ResponseData<java.lang.Integer>
     * @exception
     * @date        2020/10/18 12:34
     */
    ResponseData<Integer> saveRoleMenu(String id, List<String> menuIds);
}
